using System;
using System.ComponentModel;

namespace QLTB.BusinessObjects
{
    /// <summary>
    /// Project: NNS System 
    /// Generated Class for Table : TBL_THIETBI.
    /// Date: 06/08/2010
    /// Author: Trần Hoàng Tâm
    /// </summary>
    public class TBL_THIETBI : Object
    {
        #region Init

        private int m_DChiBH;
        private string m_DiaChiIP;
        private string m_GhiChu;
        private int m_ID;
        private int m_MaDonVi;
        private int m_MaLoaiTB;
        private int m_MaNCC;
        private string m_MaTB;
        private int m_MucDich;
        private int m_NSX;
        private DateTime m_NgaySuDung;
        private decimal m_NguyenGia;
        private string m_TenTB;
        private int m_TgianBH;
        private int m_TgianSD;
        private bool m_ThuocTS;
        private int m_TinhTrang;


        public TBL_THIETBI()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public TBL_THIETBI(
            int ID,
            string MaTB,
            string TenTB,
            int NSX,
            int MaNCC,
            decimal NguyenGia,
            DateTime NgaySuDung,
            int TinhTrang,
            int MaDonVi,
            string DiaChiIP,
            int MucDich,
            int MaLoaiTB,
            int TgianBH,
            int DChiBH,
            int TgianSD,
            bool ThuocTS,
            string GhiChu)
        {
            //
            // TODO: Add constructor logic here
            //
            SetData
                (
                    ID,
                    MaTB,
                    TenTB,
                    NSX,
                    MaNCC,
                    NguyenGia,
                    NgaySuDung,
                    TinhTrang,
                    MaDonVi,
                    DiaChiIP,
                    MucDich,
                    MaLoaiTB,
                    TgianBH,
                    DChiBH,
                    TgianSD,
                    ThuocTS,
                    GhiChu
                );
        }


        public void SetData(
            int ID,
            string MaTB,
            string TenTB,
            int NSX,
            int MaNCC,
            decimal NguyenGia,
            DateTime NgaySuDung,
            int TinhTrang,
            int MaDonVi,
            string DiaChiIP,
            int MucDich,
            int MaLoaiTB,
            int TgianBH,
            int DChiBH,
            int TgianSD,
            bool ThuocTS,
            string GhiChu)
        {
            //
            // TODO: Add constructor logic here
            //
            m_ID = ID;
            m_MaTB = MaTB;
            m_TenTB = TenTB;
            m_NSX = NSX;
            m_MaNCC = MaNCC;
            m_NguyenGia = NguyenGia;
            m_NgaySuDung = NgaySuDung;
            m_TinhTrang = TinhTrang;
            m_MaDonVi = MaDonVi;
            m_DiaChiIP = DiaChiIP;
            m_MucDich = MucDich;
            m_MaLoaiTB = MaLoaiTB;
            m_TgianBH = TgianBH;
            m_DChiBH = DChiBH;
            m_TgianSD = TgianSD;
            m_ThuocTS = ThuocTS;
            m_GhiChu = GhiChu;
        }

        #endregion

        #region Property

        [DisplayName("ID")]
        [Category("Primary Key")]
        public int ID
        {
            get { return m_ID; }
            set { m_ID = value; }
        }

        [DisplayName("MaTB")]
        [Category("Column")]
        public string MaTB
        {
            get { return m_MaTB; }
            set { m_MaTB = value; }
        }

        [DisplayName("TenTB")]
        [Category("Column")]
        public string TenTB
        {
            get { return m_TenTB; }
            set { m_TenTB = value; }
        }

        [DisplayName("NSX")]
        [Category("Column")]
        public int NSX
        {
            get { return m_NSX; }
            set { m_NSX = value; }
        }

        [DisplayName("MaNCC")]
        [Category("Column")]
        public int MaNCC
        {
            get { return m_MaNCC; }
            set { m_MaNCC = value; }
        }

        [DisplayName("NguyenGia")]
        [Category("Column")]
        public decimal NguyenGia
        {
            get { return m_NguyenGia; }
            set { m_NguyenGia = value; }
        }

        [DisplayName("NgaySuDung")]
        [Category("Column")]
        public DateTime NgaySuDung
        {
            get { return m_NgaySuDung; }
            set { m_NgaySuDung = value; }
        }

        [DisplayName("TinhTrang")]
        [Category("Column")]
        public int TinhTrang
        {
            get { return m_TinhTrang; }
            set { m_TinhTrang = value; }
        }

        [DisplayName("MaDonVi")]
        [Category("Column")]
        public int MaDonVi
        {
            get { return m_MaDonVi; }
            set { m_MaDonVi = value; }
        }

        [DisplayName("DiaChiIP")]
        [Category("Column")]
        public string DiaChiIP
        {
            get { return m_DiaChiIP; }
            set { m_DiaChiIP = value; }
        }

        [DisplayName("MucDich")]
        [Category("Column")]
        public int MucDich
        {
            get { return m_MucDich; }
            set { m_MucDich = value; }
        }

        [DisplayName("MaLoaiTB")]
        [Category("Column")]
        public int MaLoaiTB
        {
            get { return m_MaLoaiTB; }
            set { m_MaLoaiTB = value; }
        }

        [DisplayName("TgianBH")]
        [Category("Column")]
        public int TgianBH
        {
            get { return m_TgianBH; }
            set { m_TgianBH = value; }
        }

        [DisplayName("DChiBH")]
        [Category("Column")]
        public int DChiBH
        {
            get { return m_DChiBH; }
            set { m_DChiBH = value; }
        }

        [DisplayName("TgianSD")]
        [Category("Column")]
        public int TgianSD
        {
            get { return m_TgianSD; }
            set { m_TgianSD = value; }
        }

        [DisplayName("ThuocTS")]
        [Category("Column")]
        public bool ThuocTS
        {
            get { return m_ThuocTS; }
            set { m_ThuocTS = value; }
        }

        [DisplayName("GhiChu")]
        [Category("Column")]
        public string GhiChu
        {
            get { return m_GhiChu; }
            set { m_GhiChu = value; }
        }

        #endregion

        //HashTable 

        //public void SetColumnError(string elem, string error)
        //{
        //    if (propertyErrors.ContainsKey(elem))
        //    {
        //        if ((string)propertyErrors[elem] == error) return;
        //        propertyErrors[elem] = error;
        //    }
        //}
    }
}